package com.atguigu.order.config;

import feign.Retryer;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

import feign.Logger;

@Configuration
public class OrderConfig {

//    @Bean
//    Retryer feignRetryer(){
//        return new Retryer.Default();
//    }
    @Bean
    Logger.Level feignLoggerlevel(){
        return Logger.Level.FULL;
    }
    @LoadBalanced//负载均衡
    @Bean
    public RestTemplate restTemplate(){  // 添加 public 修饰符
        return new RestTemplate();
    }
}